#include<iostream>
using namespace std;
int a[200000];
int b[200000];
int v[200000];
int minhz[200000];
int ny[200000];
int main(){
    int n;
    cin>>n;
    int now=0;
    for(int i=0;i<=n;i++){
        cin>>a[i];
    }
    for(int i=1;i<=n;i++){
        cin>>b[i];
    }
    for(int i=1;i<=n;i++){
        if(now<a[i-1]){
            v[i]=v[i-1]+(a[i-1]-now);
            now=b[i];
        }
        else {
            v[i]=v[i-1];
            now+=b[i];
            now-=a[i-1];
        }
    }
     if(now<a[n]){
        v[n+1]=v[n]+(a[n]-now);
    }
    else v[n+1]=v[n];
    ny[0]=v[n+1];
    for(int i=1;i<=n;i++){
        ny[i]=ny[i-1]+b[i]-a[i-1];
        minhz[i]=0x7f7f7f7f;
        
    }
    minhz[n]=ny[n]-a[n];
    for(int i=n-1;i>=1;i--){
        minhz[i]=min(minhz[i+1],ny[i]-a[i]);
    }
    for(int i=1;i<=n;i++){
        if(minhz[i]<b[i])cout<<-minhz[i]+b[i]+v[n+1]<<" ";
        else cout<<v[n+1]<<" ";
    }
    return 0;
}